1. Field of the Invention
The present invention relates generally to raster graphics systems, and more particularly to a system and method for controlling the drawing of windows in a system for displaying multiple windows.
2. Related Art
Computer graphics techniques enjoy widespread use in contemporary computing systems. In computing systems spanning the spectrum of computing power from personal computers (PCs) to workstations to dedicated graphics systems, raster graphics techniques have become the dominant mechanism for displaying graphic images.
In a raster graphics system, horizontal display lines, called raster lines, are represented by a row of picture elements (pixels or PELs). An entire image is formed by combining a set of raster lines into a rectangular array of lines called a raster. Thus the raster, which is used to hold one or more images, comprises a matrix of pixels. This matrix of pixels is stored as digital information in a memory buffer. When the memory buffer is specifically designed to hold data that is to be transmitted to a display device, the memory buffer is referred to as a "frame buffer."
In a monochrome system, each pixel is typically represented by a single bit in the frame buffer. The state of the bit (i.e., 1 or 0) determines whether the corresponding pixel is-on or off (i.e., light or dark on the display). In such a system, the memory buffer is referred to as a bitmap.
In systems designed to hold more complex images such as color and 3D images, each pixel is represented by a plurality of bits that contain information regarding that pixel. Included in the bits that represent each pixel are bits for storing color information, bits for storing depth information, and the like. The entire matrix of bits in the memory buffer in a multiple-bit-per-pixel system is referred to as a pixmap.
To display the image, the bits in the pixmap are typically scanned out of the frame buffer in a sequential order one raster line at a time. The data that is scanned out is transmitted to a display device (most commonly a CRT video monitor). Display devices other than CRT monitors have different, although usually somewhat similar, scanning and display requirements.
As system capabilities have been improved to provide enhanced graphics, system complexity has increased as well. For example, contemporary graphics systems provide greater resolution (more pixels per unit area) and a larger selection of colors. Both of these enhancements require a larger number of bits to make up the pixmap.
As the cost of memory has gone down, systems have been provided with increased capabilities for a given cost target. With low cost random access memories (RAMs) now available and special-purpose video RAMs (VRAMs), large, high-speed frame buffers are becoming more commonplace for displaying 3D graphics.
3D raster graphics systems use a technique known as "double buffering." In double buffering, while an image is displayed from one frame buffer, a second frame buffer is cleared of all data and rewritten with a new image for a subsequent view.
This technique allows the frame buffer to be updated while the user is viewing the previous image. This prevents the screen from flickering while the frame buffer is erased and redrawn. This technique is necessary since images usually require a significant amount of time to draw relative to the time it takes to display the image on the display device.
For a detailed discussion of raster graphics systems see the text, Computer Graphics: Principles and Practice, Second Edition, published 1990 by Addison-Wesley Publishing Company, Inc., by James D. Foley, Andries van Dam, Steven K. Feiner, and John F. Hughes; specifically, see Chapters 1, 4.3, and 18.
Another area of increasing popularity in the contemporary computer market is that of "windowing." Windowing capabilities on PCs, and workstations are commonplace. In fact, windows are integral components in a graphics user interface such as Microsoft Windows.TM., the X Windows System.TM. and in numerous applications for Apple Macintosh.TM. computers.
A requirement to combine raster graphics techniques with a windows environment is a natural outgrowth of the evolution of these two technologies. Such a combination, however, presents numerous challenges. One challenge in particular is to switch between images in a double buffer while displaying animated images on a display screen.
In dynamic frame buffers it is easy to swap and clear an entire buffer quickly, thus changing the contents of the entire display area. However, for a windowed screen where only a portion of the display is to be updated, problems arise. Only a subset of the screen is typically allocated to a specific window at a given time. Because any given window can use either buffer in a double buffered frame buffer, the buffer selected by each window must be independently controlled.
Also, at any time, the foreground buffer (i.e., the buffer for display) must be selected individually for each window. But, since windows may start and end on any pixel in the display, this selection must be done for each pixel at display time.
Conventional graphics systems use window ID's (WIDs) to control drawing into windows. Before defining WIDs, it will be useful to define the term "plane" as it is used in frame buffer applications. A plane is a subset of the pixmap comprising the same bit in all pixels. A plane is a "horizontal" cross-section of the pixmap. Thus, the set consisting of the first bit in each pixel, for example, makes up a plane.
In a system employing WIDs, additional planes are included in the frame buffer memory. The additional planes hold a code, called a WID. The WID code identifies the window to which a pixel belongs. When the pixel is sent to the frame buffer, its WID code is compared to the WID identifying the window to be displayed at that location on the screen. If the comparison agrees, a write enable signal is generated and the pixel is saved in the frame buffer. If the WIDs do not compare, no write enable signal is generated and that pixel is not written to the frame buffer.
For systems using multiple frame buffers, WIDs are used to control the frame buffer to which pixel dam is written.
For a further discussion of WIDs see: U.S. Pat. No. 4,769,762 to Tsujido; U.S. Pat. No. 5,101,365 to Westberg, et al.; and U.S. Pat. No. 5,091,717 to Carrie, et al.
WID systems do have disadvantages. First, WID systems require extra circuitry for decoding the WID codes in the data and in the address and for determining if they coincide. Second, since the size of the WID is limited, this technique only allows management of a limited number of windows unless complicated "WID swapping" software is used. Many windows are required by some common Window systems. For example a three-bit WID only provides 8 unique WIDs. Third, numerous planes are required to implement WIDs in a complex system because the more windows the system has the more WID planes are required. For example, 8 WID planes are required for a 256-window system. This equates to 8 bits per pixel. In a 1k by 2k frame buffer, 16Mbits are required to support the 8 WID planes.